<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="layui/css/login.css">
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css">
    <title>小米账号-注册</title>
</head>
<!-- 测试 -->
<body>
    <!-- 首部部分 start-->
    <div class="top">
        <a href="#" class="title" style="background-image: url(images/mi-logo.png);"></a>
        <h4>注册小米账号</h4>
        <div class="middle">
            <form action="register" method="post" id="subform">
                <div style="width:500px;float:left;margin:0 20px;">
                    <br />
                    <span class="p">*</span>
                    <label for="name" class="l">用户名:</label>
                    <div style="position:relative;display:inline;">
                        <input id="name" name="name" required="required" type="text" style="height:30px;width:250px;padding-right:50px;">
                    </div>
                    <br /><br />
                    <span class="p">*</span>
                    <label for="phone" class="l">手机号:</label>
                    <div class="d">
                        <input id="phone" name="phone" required="required" type="text" class="i">
                    </div>
                    <br /><br />
                    <span class="pc">*</span>
                    <label for="gender" class="l">性别:</label>
                    <div style="position:relative;display:inline;">
                        <input id="gender" name="gender" required="required" type="text" style="height:30px;width:250px;padding-right:50px;">
                    </div>
                    <br /><br />
                    <span class="c">*</span>
                    <label for="loginPassword2" class="l">登录密码:</label>
                    <div class="d">
                        <input id="loginPassword" name="loginPassword" required="required" type="password" class="i">
                    </div>
                    <br /><br />
                    <!-- <span class="c">*</span>
                    <label for="loginPassword2" class="l">确认密码:</label>
                    <div class="d">
                        <input id="loginPassword1" name="loginPassword1" type="password" class="i">
                    </div>
                    <br /><br /> -->
                    <!-- <input type="checkbox" name="agree" style="margin-left:100px;display:inline-block;" value="1" />
                    <span style="font-size:10px;">我已阅读并同意《用户注册协议》</span> -->
                    <div style="font-size: 14px;  display: inline-block; padding: 0 1em; margin-bottom: 0.5em;" class="cheK"><input
                            type="checkbox" id="checkAgree" checked>我已阅读并同意《用户注册协议》</div>
                    <br /><br />
                    <input type="submit" id="register" value="同意以上协议并注册"
                        style="margin-left:100px;height:30px;width:300px;background-color:#FF6700;display:inline-block; border:none;color:white;font-size: 14px;" />
                </div>
            </form>

        </div>
    </div>
    <!-- 首部部分 end -->

    <!-- 尾部部分 start -->
    <div class="footer">
        <ul>
            <li><a href="#">简体</a><span>|</span></li>
            <li><a href="#">繁体</a><span>|</span></li>
            <li><a href="#">English</a><span>|</span></li>
            <li><a href="#">常见问题</a><span>|</span></li>
            <li><a href="#">隐私政策</a></li>
        </ul>
        
    </div>
    <!-- 尾部部分 end -->
    <script>
	    $(document).ready(function () {
	        $('#register').click(function () {
	            //获取2次密码
	            var loginPassword = $('#loginPassword').val();
	            var loginPassword1 = $('#loginPassword1').val();          
	            if(loginPassword == loginPassword1){	               
	                $('#subform').submit();
	                alert("注册成功");
 	            }else{
	                alert("密码输入有误");
	            }
	        });
	    });    
	</script>
</body>

</html>